<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <p>你已经在页面停留了：<span id="howlong">0天0小时0分0秒</span></p>
</body>
<script src="../js/utils.js"></script>
<script>
    window.onload = function(){
        var data1 = new Date()
    
        setInterval(function(){
            var data2 = new Date()
            timeCha(data1,data2)
            howlong.innerHTML = timeCha(data1,data2)
        },1000)

    }

</script>
</html>